<template>
	<view class="content">
		<text class="title">海龟汤大全</text>
		<view v-for="story in storys" :key="story.id" class="story-item" @click="clickStory(story)">
			{{story.id}}&nbsp;&nbsp{{story.title}}
		</view>
	</view>
</template>

<script>
	import storys from '@/static/storys.json'
	export default {
		data() {
			return {
				storys
			}
		},
		onLoad() {
			
		},
		methods: {
			clickStory(story){
				console.log('clickStory')
				uni.navigateTo({
					url:`../story/story?id=${story.id}`
				})
			}
		}
	}
</script>

<style lang='less' scoped>
	.content{
		display: flex;
		flex-direction: column;
		align-items: center;
	}
	.title{
		font-size:50rpx;
		font-weight: bold;
		margin: 30rpx;
	}
	.story-item{
		width:700rpx;
		margin: 10rpx 20rpx;
		padding: 5rpx 10rpx;
	}
</style>
